<template>
  <el-tree
    :props="props"
    :load="loadNode"
    lazy
    show-checkbox>
  </el-tree>

</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import YesNoEnum from '@/infra/constant/YesNoEnum'
import {newProductRegisterApi} from '@/feature/pdt/infra/api/newProductRegisterApi'
import CURDTable from '@/framework/components/table/CURDTable'
import {adminApi} from "@/feature/mgr/infra/api/adminApi";
import PdtNewProductRegisterStatusEnum from "@/feature/cmt/infra/constants/PdtNewProductRegisterStatusEnum";
import DialogColumnsForm from "@/framework/components/form/DialogColumnsForm";
import {dicApi} from "@/feature/sys/infra/api/dicApi";
import SysDicTypeEnum from "@/feature/sys/infra/constants/SysDicTypeEnum";
import DateType from "@/framework/constant/DateType";
import {storeApi} from "@/feature/mct/infra/api/storeApi";
import AdminTypeEnum from "@/feature/mgr/infra/constants/AdminTypeEnum";
import {complainFollowUpApi} from "@/feature/cmt/infra/api/complainFollowUpApi";
import NewStatusEnum from "@/feature/pdt/infra/constants/NewStatusEnum";
import TitleStatusEnum from "@/feature/pdt/infra/constants/TitleStatusEnum";
import DateUtil from "@/framework/infra/util/DateUtil";
export default {
  data() {
    return {
      props: {
        label: 'name',
        children: 'zones',
        isLeaf: 'leaf'
      },
    };
  },
  methods: {
    loadNode(node, resolve) {
      if (node.level === 0) {
        return resolve([{ name: 'region' }]);
      }
      if (node.level > 1) return resolve([]);

      setTimeout(() => {
        const data = [{
          name: 'leaf',
          leaf: true
        }, {
          name: 'zone'
        }];

        resolve(data);
      }, 500);
    }
  }
};
</script>

